<template>
  <div class="search-bar">
    <div class="bar-location">
      <div class="location-icon"></div>
      <div class="location-text">郑州市</div>
    </div>
    <div class="search-btn">
      <input class="place-holder" placeholder="鸡翅">
    </div>
  </div>
</template>

<script>
  import { mapState } from 'vuex'
  export default {
    name: 'HomeSearchBar',
    computed: {

    },
  }
</script>

<style lang="stylus" scoped>
  @import '~@/assets/main.styl'
  .search-bar {
    width: 100%;
    height: 0.8rem;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top:0.15rem;
    .bar-location {
      margin-right: 0.4rem;
      border-radius: 0.26rem;
      background-color: rgba(0,0,0,0.33);
      height: 0.48rem;
      width:1.84rem;
      padding-top:0.08rem
    }
    .location-icon {
      display: inline-block;
      width: 0.24rem;
      height:0.32rem;
      vertical-align:middle;
      margin-left: 0.15rem;
      margin-top: 0.02rem;
      background-image: url('/app2/img/locationIcon.png');
      background-size: cover;
    }
    .location-text {
      position: relative;
      display: inline-block;
      font-size: 12px;
      color: #fff;
      vertical-align:middle;
      margin-left: 0.08rem;
      margin-top: 0.08rem;
      margin-right: 0.5rem;
      &:after {
        content: '';
        display: block;
        position: absolute;
        width: 0.28rem;
        height: 0.28rem;
        background-image: url('/app2/img/arrowIcon.png');
        background-size: cover;
        right: -0.4rem;
        top: -0.02rem;
      }
    }
    .search-btn {
      position: relative;
      width: 3.4rem;
      height: 0.6rem;
      background-color: #fff;
      border-radius: 0.4rem;
      overflow hidden
      &:before {
        content: '';
        display: block;
        position: absolute;
        width: 0.28rem;
        height: 0.28rem;
        background-image: url('/app2/img/searchIcon.png');
        background-size: cover;
        top: 0.14rem;
        left:  0.2rem;
      }
    }
    .place-holder {
      color: #a9a9a9;
      font-size:  0.28rem;
      height: 100%;
      line-height: 0.6rem;
      margin-left: 0.56rem;
    }

  }
</style>
